Skip to content

Add SuccessDialog with celebration animation, IDE launchers, and cross-platform file manager - #60

Merged
SeamusMullan merged 3 commits into
mainfrom
copilot/add-success-message-actions
Apr 3, 2026
Merged

Add SuccessDialog with celebration animation, IDE launchers, and cross-platform file manager#60
SeamusMullan merged 3 commits into
mainfrom
copilot/add-success-message-actions

Conversation

Copilot AI commented Apr 3, 2026

Copy link
Copy Markdown
Contributor

Replaces the bare QMessageBox shown after project generation with a proper SuccessDialog that surfaces the project location and gives the user direct next-step actions.

New: SuccessDialog (src/ui/dialogs/success_dialog.py)

  • Green-accented header with cycling celebration emoji animation (🎉🎊✨🌟⭐) driven by a 400 ms QTimer that stops on close
  • Project name + output path displayed in a styled panel with selectable text
  • "Open in Finder / Explorer / Files" — platform-aware (open / explorer / xdg-open / QDesktopServices fallback)
  • "Open in IDE" buttons auto-generated at runtime for each IDE detected on PATH:
    • VSCode (code), CLion (clion), Xcode (macOS + xcodebuild only)
  • "Close" via QDialogButtonBox

Updated: GenerateTab._on_generation_finished

Swaps the old QMessageBox for SuccessDialog:

dlg = SuccessDialog(project_name, output_dir, parent=self)
dlg.exec()

Tests (tests/test_success_dialog.py)

40 unit tests covering initialisation, animation frame cycling, IDE detection per OS, file manager label/dispatch per platform, and action button slots. All existing GenerateTab tests continue to pass.

Copilot AI linked an issue Apr 3, 2026 that may be closed by this pull request
5 tasks
…anager support

Agent-Logs-Url: https://github.com/DirektDSP/PluginConfiguratorApp/sessions/f6391c3c-4acf-44a3-9211-fa7f0a0c3d4a

Co-authored-by: SeamusMullan <43112447+SeamusMullan@users.noreply.github.com>
Copilot AI changed the title [WIP] Add success message with project actions Add SuccessDialog with celebration animation, IDE launchers, and cross-platform file manager Apr 3, 2026
Copilot AI requested a review from SeamusMullan April 3, 2026 14:39
@SeamusMullan
SeamusMullan marked this pull request as ready for review April 3, 2026 18:37
@github-actions

github-actions Bot commented Apr 3, 2026

Copy link
Copy Markdown

📊 PR Summary

Changes Overview

  • Files Changed: 4
  • Python Files: 4
  • Test Files: 1
  • Documentation: 0
  • Added: 2
  • Deleted: 0

CI Checks

This PR will trigger the following checks:

  • ✅ Linting (ruff, isort, black)
  • ✅ Type Checking (mypy)
  • ✅ Tests (pytest)

Please ensure all checks pass before merging.

Copilot AI review requested due to automatic review settings April 3, 2026 18:37
@SeamusMullan
SeamusMullan merged commit 4aaa865 into main Apr 3, 2026
4 checks passed
@github-actions

github-actions Bot commented Apr 3, 2026

Copy link
Copy Markdown

📊 PR Summary

Changes Overview

  • Files Changed: 4
  • Python Files: 4
  • Test Files: 1
  • Documentation: 0
  • Added: 2
  • Deleted: 0

CI Checks

This PR will trigger the following checks:

  • ✅ Linting (ruff, isort, black)
  • ✅ Type Checking (mypy)
  • ✅ Tests (pytest)

Please ensure all checks pass before merging.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Introduces a dedicated post-generation success dialog to replace the previous bare QMessageBox, surfacing the generated project’s name/location and providing next-step actions (open in file manager / open in detected IDEs).

Changes:

  • Added SuccessDialog with a simple celebration animation, project info display, file manager action, and IDE launch actions.
  • Updated GenerateTab._on_generation_finished to show SuccessDialog instead of a QMessageBox.
  • Added a comprehensive unit test suite for the new dialog and helpers.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.

File Description
src/ui/dialogs/success_dialog.py New dialog implementation + helper functions for IDE detection and file-manager launching
src/ui/tabs/generate_tab.py Swaps post-generation message box for the new SuccessDialog
src/ui/dialogs/__init__.py Exposes SuccessDialog from the dialogs package
tests/test_success_dialog.py Adds unit tests for dialog initialization, animation, and platform-aware helpers

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +35 to +46
def _detect_ides(project_path: str) -> list[tuple[str, callable]]:
"""Return a list of (label, open_callable) for IDEs available on this machine.

Args:
project_path: Absolute path to the generated project directory.

Returns:
List of (display_label, callable) tuples where calling the callable
opens the project in the corresponding IDE.
"""
available: list[tuple[str, callable]] = []
current_os = platform.system()

Copilot AI Apr 3, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Type annotations use the built-in callable (a function) as a type (list[tuple[str, callable]]). With mypy enabled in this repo, this will be flagged as an invalid type. Use collections.abc.Callable (e.g., Callable[[], None] or Callable[[str], None]) and update both the return type and local available annotation accordingly.

Copilot uses AI. Check for mistakes.

# Dialog close button
button_box = QDialogButtonBox(QDialogButtonBox.StandardButton.Close)
button_box.rejected.connect(self.accept)

Copilot AI Apr 3, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

button_box uses the standard Close button but connects rejected to self.accept(). This makes the dialog return Accepted when the user clicks Close, which is inconsistent with Qt semantics for a Close/RejectRole action. Connect to self.reject() (or self.close()) instead.

Suggested change
button_box.rejected.connect(self.accept)
button_box.rejected.connect(self.reject)

Copilot uses AI. Check for mistakes.
Comment on lines +215 to +223
# IDE buttons (only for detected IDEs)
self._ide_actions = _detect_ides(self._output_directory)
if self._ide_actions:
ide_row = QHBoxLayout()
ide_row.setSpacing(8)
for ide_label, ide_fn in self._ide_actions:
btn = self._make_ide_button(ide_label, ide_fn)
ide_row.addWidget(btn)
actions_layout.addLayout(ide_row)

Copilot AI Apr 3, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IDE actions are detected even when output_directory is empty (the UI shows an em dash, but IDE buttons may still appear if an IDE is on PATH). Clicking those buttons will launch the IDE with an empty path, which can open the wrong location or fail. Guard IDE detection/button creation behind a truthy self._output_directory (and/or have _detect_ides return [] when the path is empty).

Copilot uses AI. Check for mistakes.
Comment on lines +27 to +34
# IDE definitions: (display_name, executable, args_before_path)
_IDE_DEFINITIONS: list[tuple[str, str, list[str]]] = [
("VSCode", "code", ["."]),
("CLion", "clion", ["."]),
("Xcode", "xcode-select", []), # macOS only - we handle separately
]


Copilot AI Apr 3, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

_IDE_DEFINITIONS is declared but never used. Either remove it to avoid confusing future readers, or refactor _detect_ides to build from this table so the definitions stay in one place.

Suggested change
# IDE definitions: (display_name, executable, args_before_path)
_IDE_DEFINITIONS: list[tuple[str, str, list[str]]] = [
("VSCode", "code", ["."]),
("CLion", "clion", ["."]),
("Xcode", "xcode-select", []), # macOS only - we handle separately
]

Copilot uses AI. Check for mistakes.
Comment on lines +232 to +241
@staticmethod
def _make_ide_button(label: str, callback: callable) -> QPushButton:
"""Return a styled IDE button that calls *callback* when clicked."""
icon_map = {"VSCode": "\U0001f4bb", "Xcode": "\U0001f528", "CLion": "\U0001f6e0"}
icon = icon_map.get(label, "\U0001f5a5")
btn = QPushButton(f"{icon} Open in {label}")
btn.setMinimumHeight(36)
btn.setToolTip(f"Open the project in {label}")
btn.clicked.connect(callback)
return btn

Copilot AI Apr 3, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

_make_ide_button annotates callback as callable, which is not a valid typing annotation under mypy. Use collections.abc.Callable with an appropriate signature (e.g., Callable[[], None]) to match what clicked.connect expects.

Copilot uses AI. Check for mistakes.
@SeamusMullan
SeamusMullan deleted the copilot/add-success-message-actions branch April 4, 2026 10:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[EPIC] Add Success Message & Actions

3 participants